package com.offcn;

import com.offcn.pojo.Setmeal;
import com.offcn.service.MemberService;
import com.offcn.service.SetmealService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: wy
 * @Date: 2022/8/31 10:11
 */
@SpringBootTest
public class Apptest {

    @Autowired
    private ApplicationContext applicationContext;

    @Test
    void t() {

        String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames();

        System.out.println("+================================================================");
        for (String beanDefinitionName : beanDefinitionNames) {
            System.out.println(beanDefinitionName);
        }

    }

    @Autowired
    private SetmealService setmealService;

    @Test
    void test() {
        Setmeal infoById = setmealService.findInfoById(12);
        System.out.println(infoById);
    }
    /*
    Setmeal(id=12, name=入职无忧体检套餐（男女通用）, code=0001, helpcode=RZTJ, sex=0, age=18-60, price=300.0, remark=入职体检套餐, attention=wqe, img=c7ece341-f2c3-4277-a7af-899f149d2518008.png,
    checkgroups=[Checkgroup(id=5, code=0001, name=一般检查, helpcode=YBJC, sex=0, remark=一般检查, attention=无,
            checkitems=[Checkitem(id=28, code=0001, name=身高, sex=0, age=0-100, price=5.0, type=1, attention=无, remark=身高),
            Checkitem(id=29, code=0002, name=体重, sex=0, age=0-100, price=5.0, type=1, attention=无, remark=体重),
            Checkitem(id=30, code=0003, name=体重指数, sex=0, age=0-100, price=5.0, type=1, attention=无, remark=体重指数),
             Checkitem(id=31, code=0004, name=收缩压, sex=0, age=0-100, price=5.0, type=1, attention=无, remark=收缩压),
             Checkitem(id=32, code=0005, name=舒张压, sex=0, age=0-100, price=5.0, type=1, attention=无, remark=舒张压)]),
     Checkgroup(id=6, code=0002, name=视力色觉, helpcode=SLSJ, sex=0, remark=视力色觉, attention=null,
                  checkitems=[Checkitem(id=33, code=0006, name=裸视力（右）, sex=0, age=0-100, price=5.0, type=1, attention=无, remark=裸视力（右）),
                      `Checkitem(id=34, code=0007, name=裸视力（左）, sex=0, age=0-100, price=5.0, type=1, attention=无, remark=裸视力（左）),
                      Checkitem(id=35, code=0008, name=矫正视力（右）, sex=0, age=0-100, price=5.0, type=1, attention=无, remark=矫正视力（右）),
                       Checkitem(id=36, code=0009, name=矫正视力（左）, sex=0, age=0-100, price=5.0, type=1, attention=无, remark=矫正视力（左）),
                        Checkitem(id=37, c`ode=0010, name=色觉, sex=0, age=0-100, price=5.0, type=1, attention=无, remark=色觉)]),
     Checkgroup(id=7, code=0003, name=血常规, helpcode=XCG, sex=0, remark=血常规, attention=null,
          checkitems=[Checkitem(id=38, code=0011, name=白细胞计数, sex=0, age=0-100, price=10.0, type=2, attention=无, remark=白细胞计数),
              Checkitem(id=39, code=0012, name=红细胞计数, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=红细胞计数),
              Checkitem(id=40, code=0013, name=血红蛋白, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=血红蛋白),
               Checkitem(id=41, code=0014, name=红细胞压积, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=红细胞压积),
               Checkitem(id=42, code=0015, name=平均红细胞体积, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=平均红细胞体积),
                Checkitem(id=43, code=0016, name=平均红细胞血红蛋白含量, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=平均红细胞血红蛋白含量),
                 Checkitem(id=44, code=0017, name=平均红细胞血红蛋白浓度, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=平均红细胞血红蛋白浓度),
                  Checkitem(id=45, code=0018, name=红细胞分布宽度-变异系数, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=红细胞分布宽度-变异系数), Checkitem(id=46, code=0019, name=血小板计数, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=血小板计数), Checkitem(id=47, code=0020, name=平均血小板体积, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=平均血小板体积), Checkitem(id=48, code=0021, name=血小板分布宽度, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=血小板分布宽度), Checkitem(id=49, code=0022, name=淋巴细胞百分比, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=淋巴细胞百分比), Checkitem(id=50, code=0023, name=中间细胞百分比, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=中间细胞百分比), Checkitem(id=51, code=0024, name=中性粒细胞百分比, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=中性粒细胞百分比), Checkitem(id=52, code=0025, name=淋巴细胞绝对值, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=淋巴细胞绝对值), Checkitem(id=53, code=0026, name=中间细胞绝对值, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=中间细胞绝对值), Checkitem(id=54, code=0027, name=中性粒细胞绝对值, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=中性粒细胞绝对值), Checkitem(id=55, code=0028, name=红细胞分布宽度-标准差, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=红细胞分布宽度-标准差), Checkitem(id=56, code=0029, name=血小板压积, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=血小板压积)]), Checkgroup(id=8, code=0004, name=尿常规, helpcode=NCG, sex=0, remark=尿常规, attention=null, checkitems=[Checkitem(id=57, code=0030, name=尿比重, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿比重), Checkitem(id=58, code=0031, name=尿酸碱度, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿酸碱度), Checkitem(id=59, code=0032, name=尿白细胞, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿白细胞), Checkitem(id=60, code=0033, name=尿亚硝酸盐, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿亚硝酸盐), Checkitem(id=61, code=0034, name=尿蛋白质, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿蛋白质), Checkitem(id=62, code=0035, name=尿糖, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿糖), Checkitem(id=63, code=0036, name=尿酮体, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿酮体), Checkitem(id=64, code=0037, name=尿胆原, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿胆原), Checkitem(id=65, code=0038, name=尿胆红素, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿胆红素), Checkitem(id=66, code=0039, name=尿隐血, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿隐血), Checkitem(id=67, code=0040, name=尿镜检红细胞, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿镜检红细胞), Checkitem(id=68, code=0041, name=尿镜检白细胞, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿镜检白细胞), Checkitem(id=69, code=0042, name=上皮细胞, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=上皮细胞), Checkitem(id=70, code=0043, name=无机盐类, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=无机盐类), Checkitem(id=71, code=0044, name=尿镜检蛋白定性, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿镜检蛋白定性)]), Checkgroup(id=9, code=0005, name=肝功三项, helpcode=GGSX, sex=0, remark=肝功三项, attention=null, checkitems=[Checkitem(id=72, code=0045, name=丙氨酸氨基转移酶, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=丙氨酸氨基转移酶), Checkitem(id=73, code=0046, name=天门冬氨酸氨基转移酶, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=天门冬氨酸氨基转移酶), Checkitem(id=74, code=0047, name=Y-谷氨酰转移酶, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=Y-谷氨酰转移酶)]), Checkgroup(id=10, code=0006, name=肾功三项, helpcode=NGSX, sex=0, remark=肾功三项, attention=null, checkitems=[Checkitem(id=75, code=0048, name=尿素, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿素), Checkitem(id=76, code=0049, name=肌酐, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=肌酐), Checkitem(id=77, code=0050, name=尿酸, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=尿酸)]), Checkgroup(id=11, code=0007, name=血脂四项, helpcode=XZSX, sex=0, remark=血脂四项, attention=null, checkitems=[Checkitem(id=78, code=0051, name=总胆固醇, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=总胆固醇), Checkitem(id=79, code=0052, name=甘油三酯, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=甘油三酯), Checkitem(id=80, code=0053, name=高密度脂蛋白胆固醇, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=高密度脂蛋白胆固醇), Checkitem(id=81, code=0054, name=低密度脂蛋白胆固醇, sex=0, age=0-100, price=10.0, type=2, attention=null, remark=低密度脂蛋白胆固醇)])])

     */


    @Autowired
    private MemberService memberService;

    @Test
    void test0() {
        List<String> months = new ArrayList<>();
        months.add("2022-09");

        List<Integer> memberCountByMonths = memberService.findMemberCountByMonths(months);
        System.out.println(memberCountByMonths);
    }


}
